home *** CD-ROM | disk | FTP | other *** search
- L_Welcome_MsgBox_Message_Text = "This script demonstrates DameWare Ping using the Windows Scripting Host."
- L_Welcome_MsgBox_Title_Text = "DameWare Windows Scripting Host Sample"
- Call Welcome()
-
- Dim DCtl1, strHostName
-
- Set DCtl1 = Wscript.CreateObject("DameWare.DPingCtl.1")
-
- strHostName = InputBox("Enter HostName to Ping (i.e. yahoo.com): ",L_Welcome_MsgBox_Title_Text)
-
- If strHostName = "" Then
- WScript.Echo "Invalid Host Name - please try again"
- WScript.Quit
- Else
- DCtl1.Ping strHostName
- dummy = MsgBox("HostName [" & strHostName & "] IP Address [" & DCtl1.IPAddress & _
- "] pinged..." , _
- vbOKOnly + vbInformation, _
- L_Welcome_MsgBox_Title_Text )
- End If
-
- Set DCtl1 = Nothing
-
- Sub Welcome()
- Dim intDoIt
-
- intDoIt = MsgBox(L_Welcome_MsgBox_Message_Text, _
- vbOKCancel + vbInformation, _
- L_Welcome_MsgBox_Title_Text )
- If intDoIt = vbCancel Then
- WScript.Quit
- End If
- End Sub